package demo.DataStrucAndAlgo.demo;

import java.util.Scanner;

/**
 * @Auther: hjy(lc))
 * @Date: 2022/10/22-10-22-16:04
 * @Description：demo.DataStrucAndAlgo.demo
 */
public class MeiTuanTest1 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String str = sc.nextLine();
        String[] split = str.split("-");
        String result = "";
        for(int i = 0; i < split.length; i++){

            if(i == split.length-1){
                result = result + split[i];
                break;
            }
            int index = split[i].length()-1;
            if(index != 0)
                result = result + split[i].substring(0,index);
            if(split[i+1].charAt(0) > split[i].charAt(index)){
                for(char c = split[i].charAt(index); c < split[i+1].charAt(0); c++){
                    result = result + c;
                }
            }else if(split[i+1].charAt(0) < split[i].charAt(index)){
                for(char c = split[i].charAt(index); c > split[i+1].charAt(0); c--){
                    result = result + c;
                }
            }
        }

        System.out.println(result);
    }
}
